package cn.stylefeng.guns.modular.basic.mapper;

import cn.stylefeng.guns.modular.basic.entity.BasicCustomer;
import cn.stylefeng.guns.modular.basic.model.params.BasicCustomerParam;
import cn.stylefeng.guns.modular.basic.model.result.BasicCustomerResult;
import cn.stylefeng.guns.modular.basic.model.result.JHZYJDResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 客户表 Mapper 接口
 */
public interface BasicCustomerMapper extends BaseMapper<BasicCustomer> {

    /**
     * 获取列表
     *
     * @author zhucx
     * @Date 2019-06-21
     */
    List<BasicCustomerResult> customList(@Param("paramCondition") BasicCustomerParam paramCondition);

    /**
     * 获取map列表
     *
     * @author zhucx
     * @Date 2019-06-21
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") BasicCustomerParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author zhucx
     * @Date 2019-06-21
     */
    Page<BasicCustomerResult> customPageList(@Param("page") Page page, @Param("paramCondition") BasicCustomerParam paramCondition,@Param("condition")String condition
    		,@Param("operateId")Long operateId);

    /**
     * 获取分页map列表
     *
     * @author zhucx
     * @Date 2019-06-21
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") BasicCustomerParam paramCondition);

	List<BasicCustomer> findListByDeptId(@Param("deptId") Long deptId);

    BasicCustomer findListByStoreIdXlb(@Param("storeIdXlb") String storeIdXlb);

	List<BasicCustomerResult> findListBySpec(@Param("paramCondition")BasicCustomerParam param,@Param("operateId")Long operateId);

    BasicCustomerResult findBySpec(@Param("paramCondition")BasicCustomerParam param, @Param("operateId")Long operateId);

	List<BasicCustomerResult> findpullStoragetaskXlbListBySpec(@Param("paramCondition")BasicCustomerParam param);

    List<BasicCustomerResult> findpullYuyueXlbListBySpec(@Param("paramCondition")BasicCustomerParam param);

    List<BasicCustomerResult> findpullReturnXlbListBySpec(@Param("paramCondition")BasicCustomerParam param);

    List<BasicCustomerResult> findpullReturnXlbgoodsListBySpec(@Param("paramCondition")BasicCustomerParam param);

    List<JHZYJDResult> findJhzyjdListByDeptId(@Param("deptId") Long deptId, @Param("currentDate") String currentDate);

    String findListByWarehouseId(@Param("warehouseId") String warehouseId);
}
